<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
</head>
<body>
	<script type="text/javascript">
		function getMaxArr( arr ){
			var where = 0;
			for (var i = 1; i < arr.length; i++) {
				if(arr[where] instanceof Array == false){
					where = i;
				}
				if(arr[i] instanceof Array){
					if( arr[where].length < arr[i].length ){
						where = i;
					}
				}else{
					continue;
				}
								 
			}
			return "最长的子数组下标为:" + where + "&nbsp元素为:"  + arr[where] + "&nbsp元素有" + arr[where].length + "个";
		}
		arr = [ 80,50, 80, [56,23,6,43,8,9,5,1,5,5,10,10],[56,23,6,43,8,9,5,1,5,5,10,10] [5,55,56,90,90,99,100], [15,21,22],[56,23,6,43,8,9,5,1,5,5,6] ];

	    document.write( getMaxArr( arr ) );
	</script>
</body>
</html>